// src/router/index.ts
import { createRouter, createWebHashHistory } from 'vue-router';
import TodoList from '@/views/TodoList.vue';
import LoginView from '@/views/LoginView.vue';
import LoginError from '@/views/LoginError.vue';
import ProfileView from '@/views/ProfileView.vue';
import PostLoginChoice from '@/views/PostLoginChoice.vue';

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: LoginView
  },
  {
    path: '/login-error',
    name: 'LoginError',
    component: LoginError
  },
  {
    path: '/todolist',
    name: 'TodoList',
    component: TodoList
  },
  {
    path: '/profile',
    name: 'Profile',
    component: ProfileView
  },
  {
    path: '/post-login-choice',
    name: 'PostLoginChoice',
    component: PostLoginChoice
  }
];

const router = createRouter({
  history: createWebHashHistory(),
  routes
});

export default router;